﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Lucid.ESA.ClientDataSystem.Application.DataTransferObjects.SiteDto>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>

    <table>
        <tr>
            <th></th>
            <th>
                Id
            </th>
            <th>
                AddressLine1
            </th>
            <th>
                AddressLine2
            </th>
            <th>
                AddressLine3
            </th>
            <th>
                AddressLine4
            </th>
            <th>
                PostCode
            </th>
            <th>
                MainSite
            </th>
            <th>
                Deleted
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Edit", "Edit", new { id = item.Id })%> |
                <%: Html.ActionLink("Details", "Details", new { id = item.Id })%>
            </td>
            <td>
                <%: item.Id %>
            </td>
            <td>
                <%: item.AddressLine1 %>
            </td>
            <td>
                <%: item.AddressLine2 %>
            </td>
            <td>
                <%: item.AddressLine3 %>
            </td>
            <td>
                <%: item.AddressLine4 %>
            </td>
            <td>
                <%: item.PostCode %>
            </td>
            <td>
                <%: item.MainSite %>
            </td>
            <td>
                <%: item.Deleted %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Create New", "Create", new { clientId = ViewData["clientId"] })%> | 
        <%: Html.ActionLink("Return to Clients", "/Index", "Client")%>
    </p>

</asp:Content>

